import { reqSearchList } from "@/api";
const state = {
     //search模块需要数据
     searchList:{}
};
const mutations = {
    GETSEARCHLIST: (state, searchList) => {
        state.searchList = searchList;
    }
}
const actions = {
    //getSearchList类的action
    getSearchList: async ({ commit, state, dispatch }, payload) => {
        //当前这个接口函数需要携带参数，至少一个空对象
        let result = await reqSearchList(payload);
        if (result.code == 200) {
            commit("GETSEARCHLIST", result.data);
        }
    }
};
const getters = {};

//默认暴露:小仓库对外暴露的是对象,默认暴露
export default {
    state,
    mutations,
    actions,
    getters
}